package com.us.usws.service.ro.impl;

import java.util.List;

import com.us.usws.dao.DeptDAO;
import com.us.usws.model.domain.system.Dept;
import com.us.usws.service.ro.DeptROService;

public class DeptROServiceImpl implements DeptROService {

	private DeptDAO dao = new DeptDAO();

	@Override
	public Dept getDept(String uid) {
		Dept ret = dao.getDept(uid);
		fillSubDepts(ret);
		return ret;
	}

	@Override
	public List<Dept> getAllDepts() {
		List<Dept> ret = dao.getAllDepts();
		for (Dept each : ret) {
			fillSubDepts(each);
		}
		return ret;
	}

	/**
	 * fill sub depts
	 * @param d
	 */
	private void fillSubDepts(Dept d) {
		//TODO: add correct codes here
	}

}
